﻿<UserControl xmlns:igWPF="http://schemas.infragistics.com/xaml/wpf"  x:Class="BlueCrestStudio.DataVirtualization.Client.Views.StockXamDataGridView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ig="clr-namespace:Infragistics.Controls.Grids;assembly=InfragisticsWPF4.Controls.Grids.XamGrid.v13.1"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WPF4"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="600">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Expander Grid.Row="0" Header="Parameters" IsExpanded="True">
            <Grid MinHeight="200">

            </Grid>
        </Expander>

        <GroupBox Grid.Row="1" Header="Stock Data">
            <igWPF:XamDataGrid DataSource="{Binding Items}"
                               RecordContainerGenerationMode="Recycle" CellContainerGenerationMode="Recycle"
                               ScrollingMode="Deferred"
                               >
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Sorting">
                        <command:EventToCommand Command="{Binding SortingCommand}" PassEventArgsToCommand="True"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>


                <igWPF:XamDataGrid.FieldLayoutSettings>
                    <igWPF:FieldLayoutSettings AutoGenerateFields="False" />
                </igWPF:XamDataGrid.FieldLayoutSettings>
                <igWPF:XamDataGrid.FieldSettings>
                    <igWPF:FieldSettings AllowEdit="False"  />
                </igWPF:XamDataGrid.FieldSettings>
                <igWPF:XamDataGrid.FieldLayouts>
                    <igWPF:FieldLayout>
                        <igWPF:Field Name="Id" />
                        <igWPF:Field Name="Symbol" />
                        <igWPF:Field Name="Bid" />
                        <igWPF:Field Name="Ask" />
                        <igWPF:Field Name="Country" />
                        <igWPF:Field Name="Date" />
                        <igWPF:Field Name="High" />
                        <igWPF:Field Name="High2" />
                        <igWPF:Field Name="High3" />
                        <igWPF:Field Name="Low"/>
                        <igWPF:Field Name="Low2"/>
                        <igWPF:Field Name="Low3"/>
                        <igWPF:Field Name="Mid"/>
                        <igWPF:Field Name="Volume"/>
                    </igWPF:FieldLayout>
                </igWPF:XamDataGrid.FieldLayouts>
            </igWPF:XamDataGrid>
        </GroupBox>

        <StatusBar Grid.Row="2">
            <Label Content="MemoryUsage: "/>
            <TextBlock Text="{Binding MemoryUsage}"/>
        </StatusBar>
    </Grid>
</UserControl>
